﻿@model PerformanceAssessment.Models.Assessment

@{
    ViewBag.Title = "Reject";
}
@using PerformanceAssessment.Models;
<h2>Reject</h2>
@if (ViewBag.assessmentStatus == AssessmentStatus.AutoEvaluationCompleted || ViewBag.assessmentStatus == AssessmentStatus.DisagreementSolved)
{
    <h3>Are you sure you want to Reject this auto evaluation?</h3>
}
else
{
    if (ViewBag.assessmentStatus == AssessmentStatus.ManagerAssessmentCompleted)
    {
        <h3>Are you sure you want to Reject this manager evaluation?</h3>
    }
}
@using (Html.BeginForm()) {
<fieldset>
    @Html.HiddenFor(model => model.ID)
    <div class="display-label">
            Review Period</div>
        <div class="display-field">
            From: @Html.Label("FromDate", Model.FromDate.ToShortDateString()) To: @Html.Label("ToDate", Model.ToDate.ToShortDateString())
        </div>
        <div class="display-label">
            Employee</div>
        <div class="display-field">
            @Html.Label(string.Format("{0} {1} {2}", Model.Employee.FirstName, Model.Employee.FirstLastName, Model.Employee.SecondLastName))
        </div>
        <div class="display-label">
            Manager</div>
        <div class="display-field">
            @Html.Label(string.Format("{0} {1}", Model.Manager.FirstName, Model.Manager.LastName))
        </div>
        <div class="display-label">
            Employee Comments</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.EmployeeComments)
        </div>
        <div class="display-label">
            Manager Comments</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.ManagerComments)
        </div>
        <div class="display-label">
            Rejection Reason</div>
        <div class="display-field">
            @Html.TextArea("comments", new { style="width:700px; font:inherit;" })
        </div>
</fieldset>

    <p>
        <input type="submit" value="Reject" /> |
        @Html.ActionLink("Back to Assessment", "Details", new { assessmentId = Model.ID })
    </p>
}